﻿// <copyright file="Helper.cs" company="Recipe Database">
//     Copyright (c) Recipe Database. All rights reserved.
// </copyright>
// <author>Bjarke Meier</author>
//-----------------------------------------------------------------------

namespace Core
{
  using System.Reflection;

  /// <summary>
  /// IMPORTANT: This class must be located at the root namespace of the assembly.
  /// Otherwise the method 'GetThisAssemblyNamespace' will not work correctly.
  /// </summary>
  internal class Helper
  {
    /// <summary>
    /// Gets "this" assembly.
    /// </summary>
    public static Assembly ThisAssembly
    {
      get { return typeof(Helper).Assembly; }
    }

    /// <summary>
    /// Gets the root namespace of the current assembly.
    /// </summary>
    /// <returns>The root namespace of the current assembly.</returns>
    public static string GetThisAssemblyNamespace()
    {
      return typeof(Helper).Namespace;
    }
  }
}